package MsgPackage;

/**
 * @author Omri Barda		039725890 
 * @author Amit Joseph		034608547
 * @author Gilad Shpigel  	300162393
 * @author Elad Elbaz		040539959
 * @version June 2012
 */

import java.util.ArrayList;
import entities.*;

public class GetLecturerCoursesPack extends MessagePack {
	private static final long serialVersionUID = 1L;
	private ArrayList<Course> lstCrs = null;
	private Lecturer lctrr;

	/**
	 * constructor
	 * 
	 * @param lctrr
	 */
	public GetLecturerCoursesPack(Lecturer lctrr) {
		this.op = OpType.GetLecturerCourse;
		this.lctrr = lctrr;
	}

	/**
	 * 
	 * @param crss
	 *            to be added
	 */
	public void AddCourses(ArrayList<Course> crss) {
		lstCrs = new ArrayList<Course>();
		lstCrs.addAll(0, crss);
	}

	/**
	 * 
	 * @return the courses
	 */
	public ArrayList<Course> getCrs() {
		return lstCrs;
	}

	/**
	 * 
	 * @param index
	 * @return the course
	 */
	public Course getCrs(int index) {
		return lstCrs.get(index);
	}
	/**
	 * 
	 * @return the lecturer
	 */
	public Lecturer getLctrr() {
		return lctrr;
	}
}
